package com.example.yucheng.service.impl;

import com.example.yucheng.domain.ReceivingPrice;
import com.example.yucheng.mapper.ReceivingPriceMapper;
import com.example.yucheng.service.ReceivingPriceService;
import com.example.yucheng.util.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RecevingPriceServiceImpl implements ReceivingPriceService {

    @Autowired
    ReceivingPriceMapper ReceivingPriceMapper;

    public Integer getCostPrice(ReceivingPrice receivingPrice){
        return ReceivingPriceMapper.getCostPrice(receivingPrice);
    }

    @Override
    public List<ReceivingPrice> getReceivingList() {
        return ReceivingPriceMapper.getReceivingList();
    }

    @Override
    public List<ReceivingPrice> getReceivingListByLimit(PageQuery pageQuery) {
        return ReceivingPriceMapper.getReceivingListByLimit(pageQuery);
    }

    @Override
    public boolean deleteReceivingPrice(int id) {
        return ReceivingPriceMapper.deleteReceivingPrice(id);
    }

    @Override
    public boolean updateReceivingPrice(ReceivingPrice receiving) {
        return ReceivingPriceMapper.updateReceivingPrice(receiving);
    }

    @Override
    public boolean insertReceivingPrice(ReceivingPrice receiving) {
        return ReceivingPriceMapper.insertReceivingPrice(receiving);
    }
}
